cmake_minimum_required(VERSION 2.8.3)
project(mower_msgs)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON) 

find_package(catkin REQUIRED COMPONENTS
  roscpp  
  std_msgs
  message_generation  
  geometry_msgs  
  actionlib
  actionlib_msgs
)

# Define destinations for installed files
# set(CATKIN_PACKAGE_SHARE_DESTINATION "share/${PROJECT_NAME}")
# set(CATKIN_PACKAGE_MSG_DESTINATION "${CATKIN_PACKAGE_SHARE_DESTINATION}/msg")
# set(CATKIN_PACKAGE_SRV_DESTINATION "${CATKIN_PACKAGE_SHARE_DESTINATION}/srv")
# set(CATKIN_PACKAGE_ACTION_DESTINATION "${CATKIN_PACKAGE_SHARE_DESTINATION}/action")
# set(CATKIN_PACKAGE_INCLUDE_DESTINATION "include/${PROJECT_NAME}")

add_message_files(DIRECTORY msg/logic_appsdk
   FILES
   hmi_bluetooth_connect_select.msg  
   base_ota_cmd.msg
   base_ota_feedback.msg
   app_get_status.msg   
)

add_message_files(DIRECTORY msg/gps_driver
   FILES
   GnssEphemMsg.msg
   GnssGloEphemMsg.msg
   GnssMeasMsg.msg
   GnssObsMsg.msg
   GnssTimeMsg.msg
   gps_gpgga.msg
   gps_utc_time.msg
   StampedFloat64Array.msg
)

add_message_files(DIRECTORY msg/all_node_comm
   FILES
   node_status.msg
   node_status_define.msg
   base_recv_state.msg
   module_version.msg
)

add_service_files(DIRECTORY srv FILES
  Cmd.srv
  app_map_cmd.srv
  app_control_cmd.srv
  app_parms_com.srv
  app_map_dealwith.srv
)

add_action_files(
  DIRECTORY action
  FILES
  state_ctl.action
)

generate_messages(DEPENDENCIES
  std_msgs
  actionlib_msgs
)

catkin_package(
  CATKIN_DEPENDS message_runtime 
  # INCLUDE_DIRS include
  # LIBRARIES 
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}  
)

# Install commands for the project

# # Install header files
# install(DIRECTORY include/${PROJECT_NAME}/
#   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
#   FILES_MATCHING PATTERN "*.h"
#   PATTERN ".svn" EXCLUDE
# )

# # Install all message files
# install(DIRECTORY msg/
#   DESTINATION ${CATKIN_PACKAGE_MSG_DESTINATION}
#   FILES_MATCHING PATTERN "*.msg"
#   PATTERN ".svn" EXCLUDE
# )

# # Install all service files
# install(DIRECTORY srv/
#   DESTINATION ${CATKIN_PACKAGE_SRV_DESTINATION}
#   FILES_MATCHING PATTERN "*.srv"
#   PATTERN ".svn" EXCLUDE
# )

# # Install all action files
# install(DIRECTORY action/
#   DESTINATION ${CATKIN_PACKAGE_ACTION_DESTINATION}
#   FILES_MATCHING PATTERN "*.action"
#   PATTERN ".svn" EXCLUDE
# )